﻿@using JinRi.Services.Helpers
@model JinRiAdmin.WebHost.ViewModels.BannerModel
@{
    ViewBag.Title = "头部图片";
}


<form name="theForm" action="@Url.Action(Html.CurrentAction())" novalidate method="post">
    <div class="box box-warning">
        <div class="box-body">
            <div class="form-group">
                @if (Model.ImageId != Guid.Empty)
                {
                    <div class="form-group">
                        <div>
                            <img src="@Url.Action("Thumb", "Image", new { id = Model.ImageId })" />
                        </div>
                    </div>
                }
                <span class="btn btn-success fileinput-button">
                    <i class="glyphicon glyphicon-plus"></i>
                    <span>上传图片</span>
                    <!-- The file input field used as target for the file upload widget -->
                    <input id="fileupload" type="file" name="file" />
                    <input id="imageId" type="hidden" name="imageId" value="@Model.ImageId" />
                </span>
                <div class="form-group">
                    <div id="progress" class="progress">
                        <div class="progress-bar progress-bar-success"></div>
                    </div>
                    <div id="result"></div>
                </div>
            </div><!-- /.box-body -->
            <div class="box-footer">
                @Html.AntiForgeryToken()
                <div class="bg-danger">
                    @Html.ValidationSummary(true)
                </div>
                <button type="submit" ng-disabled="userForm.$invalid" class="btn btn-primary">保存</button>
            </div>
        </div><!-- /.box -->
    </div>
</form>